package router

import (
	"awesomeProject/goods-web/api/category_brand"
	"awesomeProject/goods-web/middlewares"
	"github.com/gin-gonic/gin"
)

func InitCategoryBrandRouter(Router *gin.RouterGroup) {
	CategoryBrandsRouter := Router.Group("categorybrands").Use(middlewares.Trace())
	{
		CategoryBrandsRouter.GET("", category_brand.CategoryBrandList)          // 获得类别品牌列表
		CategoryBrandsRouter.GET("/:id", category_brand.GetCategoryBrandList)   // 获取某一分类的品牌
		CategoryBrandsRouter.DELETE("/:id", category_brand.DeleteCategoryBrand) // 删除类别品牌
		CategoryBrandsRouter.POST("", category_brand.NewCategoryBrand)          // 新建类别品牌
		CategoryBrandsRouter.PUT("/:id", category_brand.UpdateCategoryBrand)    // 获修改类别品牌
	}
}
